Page({
  data: {
    repairsList: []
  },
  onLoad() {
    this.getWarranty()
  },
  async getWarranty() {
    const res = await wx.$http.get('/repair', {
      current: 1,
      pageSize: 30
    })
    if (res.code !== 10000) return wx.$utilss.toast('请求失败')
    console.log(res);
    this.setData({
      repairsList: res.data.rows
    })
  },
  goDetail() {
    wx.navigateTo({
      url: '/repair_pkg/pages/detail/index',
    })
  },
  addRepair() {
    wx.navigateTo({
      url: '/repair_pkg/pages/form/index',
    })
  },
})